Change in openvpn[master]: configure: Add -Wstrict-prototypes and -Wold-style-definition
A message that is not in the archive (sent off-list or not yet received): gerrit.1718794976000.I6e08920e4cf4762b9f14a7461a29fa77df15255c@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
to review the following change.
Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition
......................................................................
configure: Add -Wstrict-prototypes and -Wold-style-definition
These are not covered by -Wall (nor -Wextra) but we want to enforce them.
---
M configure.ac
M src/openvpn/dco.h
M src/openvpn/dco_linux.c
M src/openvpn/sig.c
M src/openvpn/ssl.c
M src/openvpn/ssl.h
M src/openvpn/xkey_helper.c
M src/openvpn/xkey_provider.c
8 files changed, 9 insertions(+), 7 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/67/667/1
configure.ac +2 -0
@@ -1408,6 +1408,8 @@ ) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wstrict-prototypes]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wold-style-definition]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) if test "${enable_pedantic}" = "yes"; then
src/openvpn/dco.h +1 -1
@@ -247,7 +247,7 @@* * @return list of colon-separated ciphers */ -const char *dco_get_supported_ciphers (); +const char *dco_get_supported_ciphers (void );#else /* if defined(ENABLE_DCO) */
src/openvpn/dco_linux.c +1 -1
@@ -1053,7 +1053,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305" ; }
src/openvpn/sig.c +1 -1
@@ -448,7 +448,7 @@ }void -halt_low_priority_signals () +halt_low_priority_signals (void ) {#ifndef _WIN32struct sigaction sa;
src/openvpn/ssl.c +1 -1
@@ -277,7 +277,7 @@#endif void -enable_auth_user_pass () +enable_auth_user_pass (void ) { auth_user_pass_enabled = true; }
src/openvpn/ssl.h +1 -1
@@ -381,7 +381,7 @@void pem_password_setup (const char *auth_file);/* Enables the use of user/password authentication */ -void enable_auth_user_pass (); +void enable_auth_user_pass (void );/* * Setup authentication username and password. If auth_file is given, use the
src/openvpn/xkey_helper.c +1 -1
@@ -49,7 +49,7 @@XKEY_EXTERNAL_SIGN_fn xkey_management_sign;static void -print_openssl_errors () +print_openssl_errors (void ) {unsigned long e;while ((e =ERR_get_error ()))
src/openvpn/xkey_provider.c +1 -1
@@ -155,7 +155,7 @@ keymgmt_import_helper(XKEY_KEYDATA *key, const OSSL_PARAM params[]);static XKEY_KEYDATA * -keydata_new () +keydata_new (void ) {xkey_dmsg (D_XKEY ,"entry" );
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c
Gerrit-Change-Number: 667
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/667?usp=email )
Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
Looks good, thanks. Now waiting for the buildbots to express their happiness...
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c
Gerrit-Change-Number: 667
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Wed, 19 Jun 2024 11:05:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: cron2, flichtenheld, plaisthos.
Hello cron2, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition
......................................................................
configure: Add -Wstrict-prototypes and -Wold-style-definition
These are not covered by -Wall (nor -Wextra) but we want to enforce them.
---
M configure.ac
M src/openvpn/dco.h
M src/openvpn/dco_freebsd.c
M src/openvpn/dco_linux.c
M src/openvpn/sig.c
M src/openvpn/ssl.c
M src/openvpn/ssl.h
M src/openvpn/xkey_helper.c
M src/openvpn/xkey_provider.c
M tests/unit_tests/openvpn/test_common.h
M tests/unit_tests/openvpn/test_provider.c
M tests/unit_tests/openvpn/test_ssl.c
M tests/unit_tests/plugins/auth-pam/test_search_and_replace.c
13 files changed, 21 insertions(+), 19 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/67/667/2
configure.ac +2 -0
@@ -1408,6 +1408,8 @@ ) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wstrict-prototypes]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wold-style-definition]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) if test "${enable_pedantic}" = "yes"; then
src/openvpn/dco.h +2 -2
@@ -247,7 +247,7 @@* * @return list of colon-separated ciphers */ -const char *dco_get_supported_ciphers (); +const char *dco_get_supported_ciphers (void );#else /* if defined(ENABLE_DCO) */
@@ -375,7 +375,7 @@ }static inline const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "" ; }
src/openvpn/dco_freebsd.c +1 -1
@@ -773,7 +773,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "none:AES-256-GCM:AES-192-GCM:AES-128-GCM:CHACHA20-POLY1305" ; }
src/openvpn/dco_linux.c +1 -1
@@ -1053,7 +1053,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305" ; }
src/openvpn/sig.c +1 -1
@@ -448,7 +448,7 @@ }void -halt_low_priority_signals () +halt_low_priority_signals (void ) {#ifndef _WIN32struct sigaction sa;
src/openvpn/ssl.c +1 -1
@@ -277,7 +277,7 @@#endif void -enable_auth_user_pass () +enable_auth_user_pass (void ) { auth_user_pass_enabled = true; }
src/openvpn/ssl.h +1 -1
@@ -381,7 +381,7 @@void pem_password_setup (const char *auth_file);/* Enables the use of user/password authentication */ -void enable_auth_user_pass (); +void enable_auth_user_pass (void );/* * Setup authentication username and password. If auth_file is given, use the
src/openvpn/xkey_helper.c +1 -1
@@ -49,7 +49,7 @@XKEY_EXTERNAL_SIGN_fn xkey_management_sign;static void -print_openssl_errors () +print_openssl_errors (void ) {unsigned long e;while ((e =ERR_get_error ()))
src/openvpn/xkey_provider.c +1 -1
@@ -155,7 +155,7 @@ keymgmt_import_helper(XKEY_KEYDATA *key, const OSSL_PARAM params[]);static XKEY_KEYDATA * -keydata_new () +keydata_new (void ) {xkey_dmsg (D_XKEY ,"entry" );
tests/unit_tests/openvpn/test_common.h +1 -1
@@ -33,7 +33,7 @@* methods */ static inline void -openvpn_unit_test_setup () +openvpn_unit_test_setup (void ) {assert_int_equal (setvbuf (stdout,NULL , _IONBF,BUFSIZ ),0 );assert_int_equal (setvbuf (stderr,NULL , _IONBF,BUFSIZ ),0 );
tests/unit_tests/openvpn/test_provider.c +2 -2
@@ -119,7 +119,7 @@ }static void -init_test () +init_test (void ) {openvpn_unit_test_setup (); prov[0 ] =OSSL_PROVIDER_load (NULL ,"default" );
@@ -135,7 +135,7 @@ }static void -uninit_test () +uninit_test (void ) {for (size_t i =0 ; i <_countof (prov); i++) {
tests/unit_tests/openvpn/test_ssl.c +1 -1
@@ -81,7 +81,7 @@"-----END CERTIFICATE-----\n" ;static const char * -get_tmp_dir () +get_tmp_dir (void ) {const char *ret;#ifdef _WIN32
tests/unit_tests/plugins/auth-pam/test_search_and_replace.c +6 -6
@@ -9,7 +9,7 @@#include "utils.h" static void -pass_any_null_param__returns_null () +pass_any_null_param__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -20,7 +20,7 @@ }static void -pass_any_empty_string__returns_null () +pass_any_empty_string__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -32,7 +32,7 @@ }static void -replace_single_char__one_time__match_is_replaced () +replace_single_char__one_time__match_is_replaced (void **state) {char *replaced =searchandreplace ("X" ,"X" ,"Y" );
@@ -43,7 +43,7 @@ }static void -replace_single_char__multiple_times__match_all_matches_are_replaced () +replace_single_char__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XaX" ,"X" ,"Y" );
@@ -54,7 +54,7 @@ }static void -replace_longer_text__multiple_times__match_all_matches_are_replaced () +replace_longer_text__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XXaXX" ,"XX" ,"YY" );
@@ -65,7 +65,7 @@ }static void -pattern_not_found__returns_original () +pattern_not_found__returns_original (void **state) {char *replaced =searchandreplace ("abc" ,"X" ,"Y" );
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c
Gerrit-Change-Number: 667
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newpatchset
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/667?usp=email )
Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
changes look good, more places caught :-) - let's see if the buildbots find more.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c
Gerrit-Change-Number: 667
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Wed, 19 Jun 2024 14:28:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v2 1/1 configure: Add -Wstrict-prototypes and -Wold-style-definition
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
These are not covered by -Wall (nor -Wextra) but we want to enforce them.
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/667
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
configure.ac +2 -0
@@ -1408,6 +1408,8 @@ ) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wstrict-prototypes]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wold-style-definition]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) if test "${enable_pedantic}" = "yes"; then
src/openvpn/dco.h +2 -2
@@ -247,7 +247,7 @@* * @return list of colon-separated ciphers */ -const char *dco_get_supported_ciphers (); +const char *dco_get_supported_ciphers (void );#else /* if defined(ENABLE_DCO) */
@@ -375,7 +375,7 @@ }static inline const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "" ; }
src/openvpn/dco_freebsd.c +1 -1
@@ -773,7 +773,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "none:AES-256-GCM:AES-192-GCM:AES-128-GCM:CHACHA20-POLY1305" ; }
src/openvpn/dco_linux.c +1 -1
@@ -1053,7 +1053,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305" ; }
src/openvpn/sig.c +1 -1
@@ -448,7 +448,7 @@ }void -halt_low_priority_signals () +halt_low_priority_signals (void ) {#ifndef _WIN32struct sigaction sa;
src/openvpn/ssl.c +1 -1
@@ -277,7 +277,7 @@#endif void -enable_auth_user_pass () +enable_auth_user_pass (void ) { auth_user_pass_enabled = true; }
src/openvpn/ssl.h +1 -1
@@ -381,7 +381,7 @@void pem_password_setup (const char *auth_file);/* Enables the use of user/password authentication */ -void enable_auth_user_pass (); +void enable_auth_user_pass (void );/* * Setup authentication username and password. If auth_file is given, use the
src/openvpn/xkey_helper.c +1 -1
@@ -49,7 +49,7 @@XKEY_EXTERNAL_SIGN_fn xkey_management_sign;static void -print_openssl_errors () +print_openssl_errors (void ) {unsigned long e;while ((e =ERR_get_error ()))
src/openvpn/xkey_provider.c +1 -1
@@ -155,7 +155,7 @@ keymgmt_import_helper(XKEY_KEYDATA *key, const OSSL_PARAM params[]);static XKEY_KEYDATA * -keydata_new () +keydata_new (void ) {xkey_dmsg (D_XKEY ,"entry" );
tests/unit_tests/openvpn/test_common.h +1 -1
@@ -33,7 +33,7 @@* methods */ static inline void -openvpn_unit_test_setup () +openvpn_unit_test_setup (void ) {assert_int_equal (setvbuf (stdout,NULL , _IONBF,BUFSIZ ),0 );assert_int_equal (setvbuf (stderr,NULL , _IONBF,BUFSIZ ),0 );
tests/unit_tests/openvpn/test_provider.c +2 -2
@@ -119,7 +119,7 @@ }static void -init_test () +init_test (void ) {openvpn_unit_test_setup (); prov[0 ] =OSSL_PROVIDER_load (NULL ,"default" );
@@ -135,7 +135,7 @@ }static void -uninit_test () +uninit_test (void ) {for (size_t i =0 ; i <_countof (prov); i++) {
tests/unit_tests/openvpn/test_ssl.c +1 -1
@@ -81,7 +81,7 @@"-----END CERTIFICATE-----\n" ;static const char * -get_tmp_dir () +get_tmp_dir (void ) {const char *ret;#ifdef _WIN32
tests/unit_tests/plugins/auth-pam/test_search_and_replace.c +6 -6
@@ -9,7 +9,7 @@#include "utils.h" static void -pass_any_null_param__returns_null () +pass_any_null_param__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -20,7 +20,7 @@ }static void -pass_any_empty_string__returns_null () +pass_any_empty_string__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -32,7 +32,7 @@ }static void -replace_single_char__one_time__match_is_replaced () +replace_single_char__one_time__match_is_replaced (void **state) {char *replaced =searchandreplace ("X" ,"X" ,"Y" );
@@ -43,7 +43,7 @@ }static void -replace_single_char__multiple_times__match_all_matches_are_replaced () +replace_single_char__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XaX" ,"X" ,"Y" );
@@ -54,7 +54,7 @@ }static void -replace_longer_text__multiple_times__match_all_matches_are_replaced () +replace_longer_text__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XXaXX" ,"XX" ,"YY" );
@@ -65,7 +65,7 @@ }static void -pattern_not_found__returns_original () +pattern_not_found__returns_original (void **state) {char *replaced =searchandreplace ("abc" ,"X" ,"Y" );
Attention is currently required from: cron2, flichtenheld, plaisthos.
Hello cron2, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+2 by cron2
The change is no longer submittable: Code-Review and checks~ChecksSubmitRule are unsatisfied now.
Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition
......................................................................
configure: Add -Wstrict-prototypes and -Wold-style-definition
These are not covered by -Wall (nor -Wextra) but we want to enforce them.
---
M configure.ac
M src/openvpn/dco.h
M src/openvpn/dco_freebsd.c
M src/openvpn/dco_linux.c
M src/openvpn/pkcs11.h
M src/openvpn/sig.c
M src/openvpn/ssl.c
M src/openvpn/ssl.h
M src/openvpn/xkey_helper.c
M src/openvpn/xkey_provider.c
M tests/unit_tests/openvpn/test_common.h
M tests/unit_tests/openvpn/test_provider.c
M tests/unit_tests/openvpn/test_ssl.c
M tests/unit_tests/plugins/auth-pam/test_search_and_replace.c
14 files changed, 24 insertions(+), 22 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/67/667/3
configure.ac +2 -0
@@ -1408,6 +1408,8 @@ ) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wstrict-prototypes]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wold-style-definition]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) if test "${enable_pedantic}" = "yes"; then
src/openvpn/dco.h +2 -2
@@ -247,7 +247,7 @@* * @return list of colon-separated ciphers */ -const char *dco_get_supported_ciphers (); +const char *dco_get_supported_ciphers (void );#else /* if defined(ENABLE_DCO) */
@@ -375,7 +375,7 @@ }static inline const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "" ; }
src/openvpn/dco_freebsd.c +1 -1
@@ -773,7 +773,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "none:AES-256-GCM:AES-192-GCM:AES-128-GCM:CHACHA20-POLY1305" ; }
src/openvpn/dco_linux.c +1 -1
@@ -1053,7 +1053,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305" ; }
src/openvpn/pkcs11.h +3 -3
@@ -35,7 +35,7 @@ );void -pkcs11_terminate (); +pkcs11_terminate (void );bool pkcs11_addProvider(
@@ -46,10 +46,10 @@ );int -pkcs11_logout (); +pkcs11_logout (void );int -pkcs11_management_id_count (); +pkcs11_management_id_count (void );bool pkcs11_management_id_get(
src/openvpn/sig.c +1 -1
@@ -448,7 +448,7 @@ }void -halt_low_priority_signals () +halt_low_priority_signals (void ) {#ifndef _WIN32struct sigaction sa;
src/openvpn/ssl.c +1 -1
@@ -277,7 +277,7 @@#endif void -enable_auth_user_pass () +enable_auth_user_pass (void ) { auth_user_pass_enabled = true; }
src/openvpn/ssl.h +1 -1
@@ -381,7 +381,7 @@void pem_password_setup (const char *auth_file);/* Enables the use of user/password authentication */ -void enable_auth_user_pass (); +void enable_auth_user_pass (void );/* * Setup authentication username and password. If auth_file is given, use the
src/openvpn/xkey_helper.c +1 -1
@@ -49,7 +49,7 @@XKEY_EXTERNAL_SIGN_fn xkey_management_sign;static void -print_openssl_errors () +print_openssl_errors (void ) {unsigned long e;while ((e =ERR_get_error ()))
src/openvpn/xkey_provider.c +1 -1
@@ -155,7 +155,7 @@ keymgmt_import_helper(XKEY_KEYDATA *key, const OSSL_PARAM params[]);static XKEY_KEYDATA * -keydata_new () +keydata_new (void ) {xkey_dmsg (D_XKEY ,"entry" );
tests/unit_tests/openvpn/test_common.h +1 -1
@@ -33,7 +33,7 @@* methods */ static inline void -openvpn_unit_test_setup () +openvpn_unit_test_setup (void ) {assert_int_equal (setvbuf (stdout,NULL , _IONBF,BUFSIZ ),0 );assert_int_equal (setvbuf (stderr,NULL , _IONBF,BUFSIZ ),0 );
tests/unit_tests/openvpn/test_provider.c +2 -2
@@ -119,7 +119,7 @@ }static void -init_test () +init_test (void ) {openvpn_unit_test_setup (); prov[0 ] =OSSL_PROVIDER_load (NULL ,"default" );
@@ -135,7 +135,7 @@ }static void -uninit_test () +uninit_test (void ) {for (size_t i =0 ; i <_countof (prov); i++) {
tests/unit_tests/openvpn/test_ssl.c +1 -1
@@ -81,7 +81,7 @@"-----END CERTIFICATE-----\n" ;static const char * -get_tmp_dir () +get_tmp_dir (void ) {const char *ret;#ifdef _WIN32
tests/unit_tests/plugins/auth-pam/test_search_and_replace.c +6 -6
@@ -9,7 +9,7 @@#include "utils.h" static void -pass_any_null_param__returns_null () +pass_any_null_param__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -20,7 +20,7 @@ }static void -pass_any_empty_string__returns_null () +pass_any_empty_string__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -32,7 +32,7 @@ }static void -replace_single_char__one_time__match_is_replaced () +replace_single_char__one_time__match_is_replaced (void **state) {char *replaced =searchandreplace ("X" ,"X" ,"Y" );
@@ -43,7 +43,7 @@ }static void -replace_single_char__multiple_times__match_all_matches_are_replaced () +replace_single_char__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XaX" ,"X" ,"Y" );
@@ -54,7 +54,7 @@ }static void -replace_longer_text__multiple_times__match_all_matches_are_replaced () +replace_longer_text__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XXaXX" ,"XX" ,"YY" );
@@ -65,7 +65,7 @@ }static void -pattern_not_found__returns_original () +pattern_not_found__returns_original (void **state) {char *replaced =searchandreplace ("abc" ,"X" ,"Y" );
Signature · 16 lines
To view, visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c Gerrit-Change-Number: 667 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld <[email protected]...> Gerrit-Reviewer: cron2 <[email protected]...> Gerrit-Reviewer: plaisthos <[email protected]...> Gerrit-CC: openvpn-devel <[email protected]> Gerrit-Attention: plaisthos <[email protected]...> Gerrit-Attention: cron2 <[email protected]...> Gerrit-Attention: flichtenheld <[email protected]...> Gerrit-MessageType: newpatchset
Attention is currently required from: cron2, flichtenheld, plaisthos.
Hello cron2, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
to look at the new patch set (#4).
Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition
......................................................................
configure: Add -Wstrict-prototypes and -Wold-style-definition
These are not covered by -Wall (nor -Wextra) but we want to enforce them.
---
M configure.ac
M src/openvpn/dco.h
M src/openvpn/dco_freebsd.c
M src/openvpn/dco_linux.c
M src/openvpn/pkcs11.h
M src/openvpn/sig.c
M src/openvpn/ssl.c
M src/openvpn/ssl.h
M src/openvpn/xkey_helper.c
M src/openvpn/xkey_provider.c
M tests/unit_tests/openvpn/test_common.h
M tests/unit_tests/openvpn/test_pkcs11.c
M tests/unit_tests/openvpn/test_provider.c
M tests/unit_tests/openvpn/test_ssl.c
M tests/unit_tests/plugins/auth-pam/test_search_and_replace.c
15 files changed, 25 insertions(+), 23 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/67/667/4
configure.ac +2 -0
@@ -1408,6 +1408,8 @@ ) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wstrict-prototypes]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wold-style-definition]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) if test "${enable_pedantic}" = "yes"; then
src/openvpn/dco.h +2 -2
@@ -247,7 +247,7 @@* * @return list of colon-separated ciphers */ -const char *dco_get_supported_ciphers (); +const char *dco_get_supported_ciphers (void );#else /* if defined(ENABLE_DCO) */
@@ -375,7 +375,7 @@ }static inline const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "" ; }
src/openvpn/dco_freebsd.c +1 -1
@@ -773,7 +773,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "none:AES-256-GCM:AES-192-GCM:AES-128-GCM:CHACHA20-POLY1305" ; }
src/openvpn/dco_linux.c +1 -1
@@ -1053,7 +1053,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305" ; }
src/openvpn/pkcs11.h +3 -3
@@ -35,7 +35,7 @@ );void -pkcs11_terminate (); +pkcs11_terminate (void );bool pkcs11_addProvider(
@@ -46,10 +46,10 @@ );int -pkcs11_logout (); +pkcs11_logout (void );int -pkcs11_management_id_count (); +pkcs11_management_id_count (void );bool pkcs11_management_id_get(
src/openvpn/sig.c +1 -1
@@ -448,7 +448,7 @@ }void -halt_low_priority_signals () +halt_low_priority_signals (void ) {#ifndef _WIN32struct sigaction sa;
src/openvpn/ssl.c +1 -1
@@ -277,7 +277,7 @@#endif void -enable_auth_user_pass () +enable_auth_user_pass (void ) { auth_user_pass_enabled = true; }
src/openvpn/ssl.h +1 -1
@@ -381,7 +381,7 @@void pem_password_setup (const char *auth_file);/* Enables the use of user/password authentication */ -void enable_auth_user_pass (); +void enable_auth_user_pass (void );/* * Setup authentication username and password. If auth_file is given, use the
src/openvpn/xkey_helper.c +1 -1
@@ -49,7 +49,7 @@XKEY_EXTERNAL_SIGN_fn xkey_management_sign;static void -print_openssl_errors () +print_openssl_errors (void ) {unsigned long e;while ((e =ERR_get_error ()))
src/openvpn/xkey_provider.c +1 -1
@@ -155,7 +155,7 @@ keymgmt_import_helper(XKEY_KEYDATA *key, const OSSL_PARAM params[]);static XKEY_KEYDATA * -keydata_new () +keydata_new (void ) {xkey_dmsg (D_XKEY ,"entry" );
tests/unit_tests/openvpn/test_common.h +1 -1
@@ -33,7 +33,7 @@* methods */ static inline void -openvpn_unit_test_setup () +openvpn_unit_test_setup (void ) {assert_int_equal (setvbuf (stdout,NULL , _IONBF,BUFSIZ ),0 );assert_int_equal (setvbuf (stderr,NULL , _IONBF,BUFSIZ ),0 );
tests/unit_tests/openvpn/test_pkcs11.c +1 -1
@@ -134,7 +134,7 @@/* Fill-in certs[] array */ void -init_cert_data () +init_cert_data (void ) {struct test_cert certs_local[] = { {cert1, key1, cname1,"OVPN TEST CA1" ,"OVPN Test Cert 1" , {0 },NULL },
tests/unit_tests/openvpn/test_provider.c +2 -2
@@ -119,7 +119,7 @@ }static void -init_test () +init_test (void ) {openvpn_unit_test_setup (); prov[0 ] =OSSL_PROVIDER_load (NULL ,"default" );
@@ -135,7 +135,7 @@ }static void -uninit_test () +uninit_test (void ) {for (size_t i =0 ; i <_countof (prov); i++) {
tests/unit_tests/openvpn/test_ssl.c +1 -1
@@ -81,7 +81,7 @@"-----END CERTIFICATE-----\n" ;static const char * -get_tmp_dir () +get_tmp_dir (void ) {const char *ret;#ifdef _WIN32
tests/unit_tests/plugins/auth-pam/test_search_and_replace.c +6 -6
@@ -9,7 +9,7 @@#include "utils.h" static void -pass_any_null_param__returns_null () +pass_any_null_param__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -20,7 +20,7 @@ }static void -pass_any_empty_string__returns_null () +pass_any_empty_string__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -32,7 +32,7 @@ }static void -replace_single_char__one_time__match_is_replaced () +replace_single_char__one_time__match_is_replaced (void **state) {char *replaced =searchandreplace ("X" ,"X" ,"Y" );
@@ -43,7 +43,7 @@ }static void -replace_single_char__multiple_times__match_all_matches_are_replaced () +replace_single_char__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XaX" ,"X" ,"Y" );
@@ -54,7 +54,7 @@ }static void -replace_longer_text__multiple_times__match_all_matches_are_replaced () +replace_longer_text__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XXaXX" ,"XX" ,"YY" );
@@ -65,7 +65,7 @@ }static void -pattern_not_found__returns_original () +pattern_not_found__returns_original (void **state) {char *replaced =searchandreplace ("abc" ,"X" ,"Y" );
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c
Gerrit-Change-Number: 667
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newpatchset
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/667?usp=email )
Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c
Gerrit-Change-Number: 667
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 20 Jun 2024 14:42:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v4 1/1 configure: Add -Wstrict-prototypes and -Wold-style-definition
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
These are not covered by -Wall (nor -Wextra) but we want to enforce them.
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/667
This mail reflects revision 4 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
configure.ac +2 -0
@@ -1408,6 +1408,8 @@ ) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wstrict-prototypes]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wold-style-definition]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) if test "${enable_pedantic}" = "yes"; then
src/openvpn/dco.h +2 -2
@@ -247,7 +247,7 @@* * @return list of colon-separated ciphers */ -const char *dco_get_supported_ciphers (); +const char *dco_get_supported_ciphers (void );#else /* if defined(ENABLE_DCO) */
@@ -375,7 +375,7 @@ }static inline const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "" ; }
src/openvpn/dco_freebsd.c +1 -1
@@ -773,7 +773,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "none:AES-256-GCM:AES-192-GCM:AES-128-GCM:CHACHA20-POLY1305" ; }
src/openvpn/dco_linux.c +1 -1
@@ -1053,7 +1053,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305" ; }
src/openvpn/pkcs11.h +3 -3
@@ -35,7 +35,7 @@ );void -pkcs11_terminate (); +pkcs11_terminate (void );bool pkcs11_addProvider(
@@ -46,10 +46,10 @@ );int -pkcs11_logout (); +pkcs11_logout (void );int -pkcs11_management_id_count (); +pkcs11_management_id_count (void );bool pkcs11_management_id_get(
src/openvpn/sig.c +1 -1
@@ -448,7 +448,7 @@ }void -halt_low_priority_signals () +halt_low_priority_signals (void ) {#ifndef _WIN32struct sigaction sa;
src/openvpn/ssl.c +1 -1
@@ -277,7 +277,7 @@#endif void -enable_auth_user_pass () +enable_auth_user_pass (void ) { auth_user_pass_enabled = true; }
src/openvpn/ssl.h +1 -1
@@ -381,7 +381,7 @@void pem_password_setup (const char *auth_file);/* Enables the use of user/password authentication */ -void enable_auth_user_pass (); +void enable_auth_user_pass (void );/* * Setup authentication username and password. If auth_file is given, use the
src/openvpn/xkey_helper.c +1 -1
@@ -49,7 +49,7 @@XKEY_EXTERNAL_SIGN_fn xkey_management_sign;static void -print_openssl_errors () +print_openssl_errors (void ) {unsigned long e;while ((e =ERR_get_error ()))
src/openvpn/xkey_provider.c +1 -1
@@ -155,7 +155,7 @@ keymgmt_import_helper(XKEY_KEYDATA *key, const OSSL_PARAM params[]);static XKEY_KEYDATA * -keydata_new () +keydata_new (void ) {xkey_dmsg (D_XKEY ,"entry" );
tests/unit_tests/openvpn/test_common.h +1 -1
@@ -33,7 +33,7 @@* methods */ static inline void -openvpn_unit_test_setup () +openvpn_unit_test_setup (void ) {assert_int_equal (setvbuf (stdout,NULL , _IONBF,BUFSIZ ),0 );assert_int_equal (setvbuf (stderr,NULL , _IONBF,BUFSIZ ),0 );
tests/unit_tests/openvpn/test_pkcs11.c +1 -1
@@ -134,7 +134,7 @@/* Fill-in certs[] array */ void -init_cert_data () +init_cert_data (void ) {struct test_cert certs_local[] = { {cert1, key1, cname1,"OVPN TEST CA1" ,"OVPN Test Cert 1" , {0 },NULL },
tests/unit_tests/openvpn/test_provider.c +2 -2
@@ -119,7 +119,7 @@ }static void -init_test () +init_test (void ) {openvpn_unit_test_setup (); prov[0 ] =OSSL_PROVIDER_load (NULL ,"default" );
@@ -135,7 +135,7 @@ }static void -uninit_test () +uninit_test (void ) {for (size_t i =0 ; i <_countof (prov); i++) {
tests/unit_tests/openvpn/test_ssl.c +1 -1
@@ -81,7 +81,7 @@"-----END CERTIFICATE-----\n" ;static const char * -get_tmp_dir () +get_tmp_dir (void ) {const char *ret;#ifdef _WIN32
tests/unit_tests/plugins/auth-pam/test_search_and_replace.c +6 -6
@@ -9,7 +9,7 @@#include "utils.h" static void -pass_any_null_param__returns_null () +pass_any_null_param__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -20,7 +20,7 @@ }static void -pass_any_empty_string__returns_null () +pass_any_empty_string__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -32,7 +32,7 @@ }static void -replace_single_char__one_time__match_is_replaced () +replace_single_char__one_time__match_is_replaced (void **state) {char *replaced =searchandreplace ("X" ,"X" ,"Y" );
@@ -43,7 +43,7 @@ }static void -replace_single_char__multiple_times__match_all_matches_are_replaced () +replace_single_char__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XaX" ,"X" ,"Y" );
@@ -54,7 +54,7 @@ }static void -replace_longer_text__multiple_times__match_all_matches_are_replaced () +replace_longer_text__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XXaXX" ,"XX" ,"YY" );
@@ -65,7 +65,7 @@ }static void -pattern_not_found__returns_original () +pattern_not_found__returns_original (void **state) {char *replaced =searchandreplace ("abc" ,"X" ,"Y" );
[Openvpn-devel] [PATCH applied] Re: configure: Add -Wstrict-prototypes and -Wold-style-definition
"Because it makes sense" - we try to keep our style consistent and clean, and this will ensure we'll notice new commits with func() instead of func(void) prototypes. Plus fixing the inconsistencies we already had.
The buildbots and GH say "this works on all supported platforms", so in it goes.
Your patch has been applied to the master branch.
commit 56355924b4945ec808500b18c714c111387697f9
Author: Frank Lichtenheld Date: Thu Jun 20 16:42:30 2024 +0200
configure: Add -Wstrict-prototypes and -Wold-style-definition
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg28823.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#5) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/667?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition
......................................................................
configure: Add -Wstrict-prototypes and -Wold-style-definition
These are not covered by -Wall (nor -Wextra) but we want to enforce them.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg28823.html
---
M configure.ac
M src/openvpn/dco.h
M src/openvpn/dco_freebsd.c
M src/openvpn/dco_linux.c
M src/openvpn/pkcs11.h
M src/openvpn/sig.c
M src/openvpn/ssl.c
M src/openvpn/ssl.h
M src/openvpn/xkey_helper.c
M src/openvpn/xkey_provider.c
M tests/unit_tests/openvpn/test_common.h
M tests/unit_tests/openvpn/test_pkcs11.c
M tests/unit_tests/openvpn/test_provider.c
M tests/unit_tests/openvpn/test_ssl.c
M tests/unit_tests/plugins/auth-pam/test_search_and_replace.c
15 files changed, 25 insertions(+), 23 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/67/667/5
configure.ac +2 -0
@@ -1408,6 +1408,8 @@ ) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wstrict-prototypes]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wold-style-definition]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) if test "${enable_pedantic}" = "yes"; then
src/openvpn/dco.h +2 -2
@@ -247,7 +247,7 @@* * @return list of colon-separated ciphers */ -const char *dco_get_supported_ciphers (); +const char *dco_get_supported_ciphers (void );#else /* if defined(ENABLE_DCO) */
@@ -375,7 +375,7 @@ }static inline const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "" ; }
src/openvpn/dco_freebsd.c +1 -1
@@ -773,7 +773,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "none:AES-256-GCM:AES-192-GCM:AES-128-GCM:CHACHA20-POLY1305" ; }
src/openvpn/dco_linux.c +1 -1
@@ -1053,7 +1053,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305" ; }
src/openvpn/pkcs11.h +3 -3
@@ -35,7 +35,7 @@ );void -pkcs11_terminate (); +pkcs11_terminate (void );bool pkcs11_addProvider(
@@ -46,10 +46,10 @@ );int -pkcs11_logout (); +pkcs11_logout (void );int -pkcs11_management_id_count (); +pkcs11_management_id_count (void );bool pkcs11_management_id_get(
src/openvpn/sig.c +1 -1
@@ -448,7 +448,7 @@ }void -halt_low_priority_signals () +halt_low_priority_signals (void ) {#ifndef _WIN32struct sigaction sa;
src/openvpn/ssl.c +1 -1
@@ -277,7 +277,7 @@#endif void -enable_auth_user_pass () +enable_auth_user_pass (void ) { auth_user_pass_enabled = true; }
src/openvpn/ssl.h +1 -1
@@ -381,7 +381,7 @@void pem_password_setup (const char *auth_file);/* Enables the use of user/password authentication */ -void enable_auth_user_pass (); +void enable_auth_user_pass (void );/* * Setup authentication username and password. If auth_file is given, use the
src/openvpn/xkey_helper.c +1 -1
@@ -49,7 +49,7 @@XKEY_EXTERNAL_SIGN_fn xkey_management_sign;static void -print_openssl_errors () +print_openssl_errors (void ) {unsigned long e;while ((e =ERR_get_error ()))
src/openvpn/xkey_provider.c +1 -1
@@ -155,7 +155,7 @@ keymgmt_import_helper(XKEY_KEYDATA *key, const OSSL_PARAM params[]);static XKEY_KEYDATA * -keydata_new () +keydata_new (void ) {xkey_dmsg (D_XKEY ,"entry" );
tests/unit_tests/openvpn/test_common.h +1 -1
@@ -33,7 +33,7 @@* methods */ static inline void -openvpn_unit_test_setup () +openvpn_unit_test_setup (void ) {assert_int_equal (setvbuf (stdout,NULL , _IONBF,BUFSIZ ),0 );assert_int_equal (setvbuf (stderr,NULL , _IONBF,BUFSIZ ),0 );
tests/unit_tests/openvpn/test_pkcs11.c +1 -1
@@ -134,7 +134,7 @@/* Fill-in certs[] array */ void -init_cert_data () +init_cert_data (void ) {struct test_cert certs_local[] = { {cert1, key1, cname1,"OVPN TEST CA1" ,"OVPN Test Cert 1" , {0 },NULL },
tests/unit_tests/openvpn/test_provider.c +2 -2
@@ -119,7 +119,7 @@ }static void -init_test () +init_test (void ) {openvpn_unit_test_setup (); prov[0 ] =OSSL_PROVIDER_load (NULL ,"default" );
@@ -135,7 +135,7 @@ }static void -uninit_test () +uninit_test (void ) {for (size_t i =0 ; i <_countof (prov); i++) {
tests/unit_tests/openvpn/test_ssl.c +1 -1
@@ -81,7 +81,7 @@"-----END CERTIFICATE-----\n" ;static const char * -get_tmp_dir () +get_tmp_dir (void ) {const char *ret;#ifdef _WIN32
tests/unit_tests/plugins/auth-pam/test_search_and_replace.c +6 -6
@@ -9,7 +9,7 @@#include "utils.h" static void -pass_any_null_param__returns_null () +pass_any_null_param__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -20,7 +20,7 @@ }static void -pass_any_empty_string__returns_null () +pass_any_empty_string__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -32,7 +32,7 @@ }static void -replace_single_char__one_time__match_is_replaced () +replace_single_char__one_time__match_is_replaced (void **state) {char *replaced =searchandreplace ("X" ,"X" ,"Y" );
@@ -43,7 +43,7 @@ }static void -replace_single_char__multiple_times__match_all_matches_are_replaced () +replace_single_char__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XaX" ,"X" ,"Y" );
@@ -54,7 +54,7 @@ }static void -replace_longer_text__multiple_times__match_all_matches_are_replaced () +replace_longer_text__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XXaXX" ,"XX" ,"YY" );
@@ -65,7 +65,7 @@ }static void -pattern_not_found__returns_original () +pattern_not_found__returns_original (void **state) {char *replaced =searchandreplace ("abc" ,"X" ,"Y" );
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c
Gerrit-Change-Number: 667
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/667?usp=email )
Change subject: configure: Add -Wstrict-prototypes and -Wold-style-definition
......................................................................
configure: Add -Wstrict-prototypes and -Wold-style-definition
These are not covered by -Wall (nor -Wextra) but we want to enforce them.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg28823.html
---
M configure.ac
M src/openvpn/dco.h
M src/openvpn/dco_freebsd.c
M src/openvpn/dco_linux.c
M src/openvpn/pkcs11.h
M src/openvpn/sig.c
M src/openvpn/ssl.c
M src/openvpn/ssl.h
M src/openvpn/xkey_helper.c
M src/openvpn/xkey_provider.c
M tests/unit_tests/openvpn/test_common.h
M tests/unit_tests/openvpn/test_pkcs11.c
M tests/unit_tests/openvpn/test_provider.c
M tests/unit_tests/openvpn/test_ssl.c
M tests/unit_tests/plugins/auth-pam/test_search_and_replace.c
15 files changed, 25 insertions(+), 23 deletions(-)
configure.ac +2 -0
@@ -1408,6 +1408,8 @@ ) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wstrict-prototypes]) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wold-style-definition]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall]) if test "${enable_pedantic}" = "yes"; then
src/openvpn/dco.h +2 -2
@@ -247,7 +247,7 @@* * @return list of colon-separated ciphers */ -const char *dco_get_supported_ciphers (); +const char *dco_get_supported_ciphers (void );#else /* if defined(ENABLE_DCO) */
@@ -375,7 +375,7 @@ }static inline const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "" ; }
src/openvpn/dco_freebsd.c +1 -1
@@ -773,7 +773,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "none:AES-256-GCM:AES-192-GCM:AES-128-GCM:CHACHA20-POLY1305" ; }
src/openvpn/dco_linux.c +1 -1
@@ -1053,7 +1053,7 @@ }const char * -dco_get_supported_ciphers () +dco_get_supported_ciphers (void ) {return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305" ; }
src/openvpn/pkcs11.h +3 -3
@@ -35,7 +35,7 @@ );void -pkcs11_terminate (); +pkcs11_terminate (void );bool pkcs11_addProvider(
@@ -46,10 +46,10 @@ );int -pkcs11_logout (); +pkcs11_logout (void );int -pkcs11_management_id_count (); +pkcs11_management_id_count (void );bool pkcs11_management_id_get(
src/openvpn/sig.c +1 -1
@@ -448,7 +448,7 @@ }void -halt_low_priority_signals () +halt_low_priority_signals (void ) {#ifndef _WIN32struct sigaction sa;
src/openvpn/ssl.c +1 -1
@@ -277,7 +277,7 @@#endif void -enable_auth_user_pass () +enable_auth_user_pass (void ) { auth_user_pass_enabled = true; }
src/openvpn/ssl.h +1 -1
@@ -381,7 +381,7 @@void pem_password_setup (const char *auth_file);/* Enables the use of user/password authentication */ -void enable_auth_user_pass (); +void enable_auth_user_pass (void );/* * Setup authentication username and password. If auth_file is given, use the
src/openvpn/xkey_helper.c +1 -1
@@ -49,7 +49,7 @@XKEY_EXTERNAL_SIGN_fn xkey_management_sign;static void -print_openssl_errors () +print_openssl_errors (void ) {unsigned long e;while ((e =ERR_get_error ()))
src/openvpn/xkey_provider.c +1 -1
@@ -155,7 +155,7 @@ keymgmt_import_helper(XKEY_KEYDATA *key, const OSSL_PARAM params[]);static XKEY_KEYDATA * -keydata_new () +keydata_new (void ) {xkey_dmsg (D_XKEY ,"entry" );
tests/unit_tests/openvpn/test_common.h +1 -1
@@ -33,7 +33,7 @@* methods */ static inline void -openvpn_unit_test_setup () +openvpn_unit_test_setup (void ) {assert_int_equal (setvbuf (stdout,NULL , _IONBF,BUFSIZ ),0 );assert_int_equal (setvbuf (stderr,NULL , _IONBF,BUFSIZ ),0 );
tests/unit_tests/openvpn/test_pkcs11.c +1 -1
@@ -134,7 +134,7 @@/* Fill-in certs[] array */ void -init_cert_data () +init_cert_data (void ) {struct test_cert certs_local[] = { {cert1, key1, cname1,"OVPN TEST CA1" ,"OVPN Test Cert 1" , {0 },NULL },
tests/unit_tests/openvpn/test_provider.c +2 -2
@@ -119,7 +119,7 @@ }static void -init_test () +init_test (void ) {openvpn_unit_test_setup (); prov[0 ] =OSSL_PROVIDER_load (NULL ,"default" );
@@ -135,7 +135,7 @@ }static void -uninit_test () +uninit_test (void ) {for (size_t i =0 ; i <_countof (prov); i++) {
tests/unit_tests/openvpn/test_ssl.c +1 -1
@@ -81,7 +81,7 @@"-----END CERTIFICATE-----\n" ;static const char * -get_tmp_dir () +get_tmp_dir (void ) {const char *ret;#ifdef _WIN32
tests/unit_tests/plugins/auth-pam/test_search_and_replace.c +6 -6
@@ -9,7 +9,7 @@#include "utils.h" static void -pass_any_null_param__returns_null () +pass_any_null_param__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -20,7 +20,7 @@ }static void -pass_any_empty_string__returns_null () +pass_any_empty_string__returns_null (void **state) {char DUMMY [] ="DUMMY" ;
@@ -32,7 +32,7 @@ }static void -replace_single_char__one_time__match_is_replaced () +replace_single_char__one_time__match_is_replaced (void **state) {char *replaced =searchandreplace ("X" ,"X" ,"Y" );
@@ -43,7 +43,7 @@ }static void -replace_single_char__multiple_times__match_all_matches_are_replaced () +replace_single_char__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XaX" ,"X" ,"Y" );
@@ -54,7 +54,7 @@ }static void -replace_longer_text__multiple_times__match_all_matches_are_replaced () +replace_longer_text__multiple_times__match_all_matches_are_replaced (void **state) {char *replaced =searchandreplace ("XXaXX" ,"XX" ,"YY" );
@@ -65,7 +65,7 @@ }static void -pattern_not_found__returns_original () +pattern_not_found__returns_original (void **state) {char *replaced =searchandreplace ("abc" ,"X" ,"Y" );
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6e08920e4cf4762b9f14a7461a29fa77df15255c
Gerrit-Change-Number: 667
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged